public class ComparableSquare extends Square
        implements Comparable<ComparableSquare>{
    public ComparableSquare(double a) {
        super(a);
    }
    public int compareTo(ComparableSquare o) {
        if (getArea() > o.getArea())
            return 1;
        else if (getArea() < o.getArea())
            return -1;
        else
            return 0;
    }
    public String toString() {
        return "边长: " + getA() + " Area: " + getArea();
    }
}
